/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       bool_array.cpp

	$Header: /game/bool_array.cpp $

	$NoKeywords: $

 ************************************************************************/

#include "precompiled.h"
#include "bool_array.h"

#include "streambuf_operators.h"

bool t_bool_array::read( std::streambuf& stream )
{
	int count = get<t_uint16>( stream );

	resize( count );
	if (count > 0)
		::read( stream, &(*begin()), count );
	return true;
}

bool t_bool_array::write( std::streambuf& stream ) const
{
	put<t_uint16>( stream, size() );
	if (size() > 0)
		::write( stream, &(*begin()), size() );
	return true;
}
